function [y] = sincdir(x)
% sincdir(x)
% 	Parameters:
% 		x:	a sequence
% 
% 	Outputs:
% 		y	a sequence
% 
% 	Purpose fo this code: This code will apply the first derivative of a given sinc function to the values of squence to return a
% 	new sequence.


y = zeros(size(x));
%sincres = sinc(x);
for j=1:length(x)
    if(x(j)==0) 
        y(j)=0;
    else
        %y(j)=(((sin(pi*x(j))/(pi*x(j)))-cos(pi.*x(j)))./x(j));
        %y(j) = (-1).*((sinc(x(j)))-cos(pi.*(x(j))))./(x(j));
        y(j) = cos(pi*x(j))/x(j) - sin(pi*x(j))/(pi*x(j)^2);
    end
end
